home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / source / kernel / Makefile.dos < prev    next >
Encoding:
Makefile  |  1994-05-14  |  3.2 KB  |  174 lines  |  [TEXT/R*ch]

  1. # Makefile for interface-independent code in Xconq.
  2. # Copyright (C) 1994 Ed Boston.
  3.  
  4. # Xconq is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. prefix = /usr/local
  10.  
  11. srcdir = .
  12.  
  13. # Set this for wherever the library directory should be.
  14.  
  15. LIBDIR = $(srcdir)/../lib
  16.  
  17. # Set this for wherever the man page should live.
  18.  
  19. MANDIR = /usr/man/manl
  20.  
  21. CC = cl
  22.  
  23. CFLAGS = -AL -Od -Zepi -DDEBUG -Gt10 
  24.  
  25. # Host and target-dependent makefile fragments come in here.
  26. ####
  27. # End of host and target-dependent makefile fragments.
  28.  
  29. GAME_H = game.h gvar.def utype.def mtype.def ttype.def table.def
  30.  
  31. UNIT_H = unit.h action.def plan.def task.def
  32.  
  33. ALL_H = conq.h config.h misc.h dir.h lisp.h $(GAME_H) player.h side.h \
  34.     $(UNIT_H) world.h history.h history.def module.h score.h \
  35.     ai.h goal.def keyword.def
  36.  
  37. # Non-interface-specific object files.
  38.  
  39. OBJ = \
  40.     init.obj \
  41.     cmdline.obj \
  42.     ai.obj \
  43.     mplay.obj \
  44.     mplay2.obj \
  45.     actions.obj \
  46.     combat.obj \
  47.     run.obj \
  48.     score.obj \
  49.     world.obj \
  50.     history.obj \
  51.     module.obj \
  52.     write.obj \
  53.     read.obj \
  54.     lisp.obj \
  55.     mkterr.obj \
  56.     mkunits.obj \
  57.     mkrivers.obj \
  58.     mkroads.obj \
  59.     mknames.obj \
  60.     side.obj \
  61.     unit.obj \
  62.     plan.obj \
  63.     plan2.obj \
  64.     task.obj \
  65.     nlang.obj \
  66.     grutil.obj \
  67.     ps.obj \
  68.     util.obj \
  69.     help.obj \
  70.     dos.obj \
  71.     version.obj
  72.  
  73. # Object files needed by nonspecialized executables.
  74.  
  75. GOBJ =    generic.obj \
  76.     types.obj \
  77.     tables.obj
  78.  
  79. # Random C compiler flags.
  80.  
  81. MSDOS_CFLAGS = -DMSDOS -DUSE_CONSOLE -DXCONQLIB=\"$(LIBDIR)\"
  82.  
  83. ALL_CFLAGS = $(CFLAGS) $(MSDOS_CFLAGS) -I$(srcdir)
  84.  
  85. .c.obj:
  86.     $(CC) -c /YX $(ALL_CFLAGS) $<
  87.  
  88. # Do it all.
  89.  
  90. all: conq.lib skelconq.exe
  91.  
  92. # The kernel library.  This is linked with interface code.
  93.  
  94. conq.lib: $(OBJ) $(GOBJ)
  95.     !lib /PAGE:32 conq.lib -+$?;
  96.  
  97. # Test version of xconq.
  98.  
  99. skelconq.exe: skelconq.obj $(OBJ) $(GOBJ) compile.obj
  100.     $(CC) $(ALL_CFLAGS) skelconq.obj $(OBJ) $(GOBJ) compile.obj
  101.  
  102. # Support things.
  103.  
  104. # (should do with a shell script, then can intercept failures)
  105. special.h: skelconq
  106.     skelconq <compile >special.h
  107.  
  108. tests:
  109.     run-tests
  110.  
  111. # Usual cleaning, and flushing of anything junk-like.
  112.  
  113. clean:
  114.     del *.obj 
  115.     del *.log
  116.     del *.bak
  117.  
  118. distclean: clean
  119.     del *.exe
  120.     del *.lib
  121.     del msvc.*
  122.  
  123. realclean: distclean
  124.  
  125. # All the .h dependencies.
  126.  
  127. init.obj:        $(ALL_H)
  128. cmdline.obj:    $(ALL_H)
  129. mknames.obj:    $(ALL_H)
  130. ai.obj:        $(ALL_H)
  131. actions.obj:    $(ALL_H)
  132. combat.obj:    $(ALL_H)
  133. plan.obj:        $(ALL_H)
  134. plan2.obj:    $(ALL_H)
  135. task.obj:        $(ALL_H)
  136. run.obj:        $(ALL_H)
  137. score.obj:    $(ALL_H)
  138. world.obj:    $(ALL_H)
  139. history.obj:    $(ALL_H)
  140. module.obj:    $(ALL_H)
  141. read.obj:        $(ALL_H)
  142. write.obj:    $(ALL_H)
  143. side.obj:        $(ALL_H)
  144. unit.obj:        $(ALL_H)
  145. help.obj:        $(ALL_H)
  146. nlang.obj:    $(ALL_H)
  147. grutil.obj:    $(ALL_H)
  148. ps.obj:        $(ALL_H)
  149. util.obj:        $(ALL_H)
  150. dos.obj:        $(ALL_H)
  151. mkunits.obj:    $(ALL_H)
  152. mkterr.obj:    $(ALL_H)
  153. mkrivers.obj:    $(ALL_H)
  154. mkroads.obj:    $(ALL_H)
  155.  
  156. generic.obj:    config.h misc.h lisp.h $(GAME_H)
  157. types.obj:    config.h misc.h lisp.h $(GAME_H)
  158. tables.obj:    config.h misc.h lisp.h $(GAME_H)
  159.  
  160. lisp.obj:        config.h misc.h lisp.h
  161.  
  162. mplay.obj:    $(ALL_H) mplay.h
  163. mplay2.obj:    $(ALL_H) mplay.h
  164.  
  165. skelconq.obj:    $(ALL_H)
  166.  
  167. # This *must* be compiled by a proper ANSI compiler.
  168.  
  169. compile.obj:    $(ALL_H)
  170.  
  171.  
  172.  
  173.  
  174.